package com.example.designPatten.observer.ObserverJavaAPI;

import java.util.ArrayList;
import java.util.List;
import java.util.Observable;

/**
* @Title:   []
* @Description: 
* @Date : 2016年4月20日下午4:43:02
* @Company: SI-TECH
* @author : LIJXD
* @version : 1.0
* @modify history
*  <p>修改日期    修改人   修改目的<p> 	
*/
public class WeatherData extends Observable{

	private float temperature;
	private float humidity;
	private float pressure;
	 

	public void messurementChanges(){ //测量
		setChanged();
		notifyObservers();
	}
	
	public void setMessurement(float temperature,float  humidity, float pressure){
		this.temperature = temperature;
		this.humidity = humidity;
		this.pressure = pressure;
		messurementChanges();
	}

	/**
	 * @return the temperature
	 */
	public float getTemperature() {
		return temperature;
	}

	/**
	 * @return the humidity
	 */
	public float getHumidity() {
		return humidity;
	}

	/**
	 * @return the pressure
	 */
	public float getPressure() {
		return pressure;
	}
	
	
}
